export interface UserLoginType {
  username: string
  password: string
}

export interface UserLoginToken {
  accessToken: string
  refreshToken?: string
}

export interface Role {
  code: string
  name: string
}

export interface UserInfo {
  id: number
  name: string
  username: string
  status: boolean
  email: string
  mobile: null | string
  avatar: null | string
  passwordErrorCount: number
  passwordErrorTime: null | string
  lastLoginTime: null | string
  lastLoginIp: null | string
  createdAt: string
  roles: Role[]
  departmentId: number
  departmentName: string
  departmentParentId: number
  departmentParentName: string
}

export interface LoginUserData extends RefreshTokenType {
  user: UserInfo
}

export interface UserType {
  username: string
  password: string
  role: string
  roleId: string
}

export interface RefreshTokenType {
  token: UserLoginToken
  isDoubleToken: boolean
}
